import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import PositionGrid from './PositionGrid';
import initPositions from './PositionGrid.fixture';

export default {
  title: 'Example/PositionGrid',
  component: PositionGrid,
  argTypes: {
  },
} as ComponentMeta<typeof PositionGrid>;

const Template: ComponentStory<typeof PositionGrid> = (args) => <PositionGrid {...args} />;

export const LoadingData = Template.bind({});
LoadingData.args = {
    loading: true,
    rows: []
};

export const EmptyData = Template.bind({});
EmptyData.args = {
    loading: false,
    rows: []
};

export const ResolvedData = Template.bind({});
ResolvedData.args = {
    loading: false,
    rows: initPositions
};

export const RejectedData = Template.bind({});
RejectedData.args = {
};
